<?php

// 商品套餐

namespace app\shop\model;

use think\Model;

class ShopGoodsComboSelected extends Model
{
    /*
   * 选中商品和商品表多对一
   */
    public function shopGoods()
    {
        return $this->belongsTo('ShopGoods','goods_id','id')
            ->field('id,member_id,title,thumb_img,price,rebate_percentage,freight,goods_str,charges');
    }
    /*
     * 选择商品和商品属性关联表多对一
     */
    public function shopSpecAttr()
    {
        return $this->belongsTo('ShopSpecAttr','goods_attr_id','id');
    }
}